﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="RapidEntitySchema" targetNamespace="http://schemas.microsoft.com/dsltools/RapidEntity" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/RapidEntity" xmlns:core="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import id="CoreSchema" namespace="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" />
  <!-- NamedElement -->
  <xsd:element name="namedElement" abstract="true" type="NamedElement" substitutionGroup="core:modelElement" />
  <xsd:complexType name="NamedElement" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- NamedElement Moniker -->
  <xsd:element name="namedElementMoniker" abstract="true" type="NamedElementMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="NamedElementMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for NamedElement instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="name" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelRoot -->
  <xsd:element name="modelRoot" type="ModelRoot" substitutionGroup="namedElement" />
  <xsd:complexType name="ModelRoot">
    <xsd:complexContent>
      <xsd:extension base="NamedElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: ModelRootHasComments -->
          <xsd:element name="comments" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of ModelRootHasComments</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="modelRootHasComments">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from ModelRootHasComments needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="comment" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: ModelRootHasTypes -->
          <xsd:element name="types" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of ModelRootHasTypes</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="modelRootHasTypes">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from ModelRootHasTypes needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="modelType" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- dslVersion -->
        <xsd:attribute name="dslVersion" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelRoot Moniker -->
  <xsd:element name="modelRootMoniker" type="ModelRootMoniker" substitutionGroup="namedElementMoniker" />
  <xsd:complexType name="ModelRootMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ModelRoot instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="NamedElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelClass -->
  <xsd:element name="modelClass" type="ModelClass" substitutionGroup="modelType" />
  <xsd:complexType name="ModelClass">
    <xsd:complexContent>
      <xsd:extension base="ModelType">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: ClassHasFields -->
          <xsd:element name="fields" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of ClassHasFields</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="classHasFields">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from ClassHasFields needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="field" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: Generalization -->
          <xsd:element name="subclasses" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of Generalization</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="generalization" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of Generalization needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: OneToOne -->
          <xsd:element name="oneToOneTargets" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of OneToOne</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="oneToOne" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of OneToOne needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: OneToMany -->
          <xsd:element name="oneToManyTargets" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of OneToMany</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="oneToMany" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of OneToMany needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: ManyToMany -->
          <xsd:element name="manyTargetModel" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of ManyToMany</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="manyToMany" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of ManyToMany needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: ClassHasPersistentKeys -->
          <xsd:element name="persistentKeys" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of ClassHasPersistentKeys</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="classHasPersistentKeys">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from ClassHasPersistentKeys needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="persistentKey" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Property: Kind -->
        <xsd:attribute name="kind" type="xsd:string" />
        <!-- Property: IsAbstract -->
        <xsd:attribute name="isAbstract" type="InheritanceModifier" />
        <!-- Property: TableName -->
        <xsd:attribute name="tableName" type="xsd:string" />
        <!-- Property: ParentName -->
        <xsd:attribute name="parentName" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelClass Moniker -->
  <xsd:element name="modelClassMoniker" type="ModelClassMoniker" substitutionGroup="modelTypeMoniker" />
  <xsd:complexType name="ModelClassMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ModelClass instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ModelTypeMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Field -->
  <xsd:element name="field" type="Field" substitutionGroup="modelAttribute" />
  <xsd:complexType name="Field">
    <xsd:annotation>
      <xsd:documentation>An attribute of a class.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ModelAttribute">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Field Moniker -->
  <xsd:element name="fieldMoniker" type="FieldMoniker" substitutionGroup="modelAttributeMoniker" />
  <xsd:complexType name="FieldMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Field instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ModelAttributeMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Comment -->
  <xsd:element name="comment" type="Comment" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Comment">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: CommentReferencesSubjects -->
          <xsd:element name="subjects" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of CommentReferencesSubjects</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="commentReferencesSubjects">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from CommentReferencesSubjects needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="modelTypeMoniker" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Text -->
        <xsd:attribute name="text" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Comment Moniker -->
  <xsd:element name="commentMoniker" type="CommentMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="CommentMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Comment instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelType -->
  <xsd:element name="modelType" abstract="true" type="ModelType" substitutionGroup="classModelElement" />
  <xsd:complexType name="ModelType" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="ClassModelElement">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelType Moniker -->
  <xsd:element name="modelTypeMoniker" abstract="true" type="ModelTypeMoniker" substitutionGroup="classModelElementMoniker" />
  <xsd:complexType name="ModelTypeMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ModelType instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ClassModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ClassModelElement -->
  <xsd:element name="classModelElement" abstract="true" type="ClassModelElement" substitutionGroup="namedElement" />
  <xsd:complexType name="ClassModelElement" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Element with a Description</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="NamedElement">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ClassModelElement Moniker -->
  <xsd:element name="classModelElementMoniker" abstract="true" type="ClassModelElementMoniker" substitutionGroup="namedElementMoniker" />
  <xsd:complexType name="ClassModelElementMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ClassModelElement instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="NamedElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- PersistentKey -->
  <xsd:element name="persistentKey" type="PersistentKey" substitutionGroup="modelAttribute" />
  <xsd:complexType name="PersistentKey">
    <xsd:complexContent>
      <xsd:extension base="ModelAttribute">
        <!-- Property: IsAutoKey -->
        <xsd:attribute name="isAutoKey" type="xsd:boolean" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- PersistentKey Moniker -->
  <xsd:element name="persistentKeyMoniker" type="PersistentKeyMoniker" substitutionGroup="modelAttributeMoniker" />
  <xsd:complexType name="PersistentKeyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for PersistentKey instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ModelAttributeMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelAttribute -->
  <xsd:element name="modelAttribute" type="ModelAttribute" substitutionGroup="classModelElement" />
  <xsd:complexType name="ModelAttribute">
    <xsd:complexContent>
      <xsd:extension base="ClassModelElement">
        <!-- Property: Type -->
        <xsd:attribute name="type" type="xsd:string" />
        <!-- Property: ColumnName -->
        <xsd:attribute name="columnName" type="xsd:string" />
        <!-- Property: AllowNull -->
        <xsd:attribute name="allowNull" type="xsd:boolean" />
        <!-- Property: Precision -->
        <xsd:attribute name="precision" type="xsd:integer" />
        <!-- Property: Scale -->
        <xsd:attribute name="scale" type="xsd:integer" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelAttribute Moniker -->
  <xsd:element name="modelAttributeMoniker" type="ModelAttributeMoniker" substitutionGroup="classModelElementMoniker" />
  <xsd:complexType name="ModelAttributeMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ModelAttribute instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ClassModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- BaseRelationship -->
  <xsd:element name="baseRelationship" abstract="true" type="BaseRelationship" substitutionGroup="core:modelElement" />
  <xsd:complexType name="BaseRelationship" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Associations between Classes.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end ModelClass -->
          <xsd:element ref="modelClassMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: SourceMultiplicity -->
        <xsd:attribute name="sourceMultiplicity" type="Multiplicity" />
        <!-- Property: SourceRoleName -->
        <xsd:attribute name="sourceRoleName" type="xsd:string" />
        <!-- Property: TargetMultiplicity -->
        <xsd:attribute name="targetMultiplicity" type="Multiplicity" />
        <!-- Property: TargetRoleName -->
        <xsd:attribute name="targetRoleName" type="xsd:string" />
        <!-- Property: ReferenceColumn -->
        <xsd:attribute name="referenceColumn" type="xsd:string" />
        <!-- Property: ReferenceEntity -->
        <xsd:attribute name="referenceEntity" type="xsd:string" />
        <!-- Property: OwnerEntity -->
        <xsd:attribute name="ownerEntity" type="xsd:string" />
        <!-- Property: DefaultRoleName -->
        <xsd:attribute name="defaultRoleName" type="xsd:string" />
        <!-- Property: ManyRoleName -->
        <xsd:attribute name="manyRoleName" type="xsd:string" />
        <!-- Property: OneRoleName -->
        <xsd:attribute name="oneRoleName" type="xsd:string" />
        <!-- Property: ReferencedKey -->
        <xsd:attribute name="referencedKey" type="xsd:string" />
        <!-- Property: Type -->
        <xsd:attribute name="type" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- BaseRelationship Moniker -->
  <xsd:element name="baseRelationshipMoniker" abstract="true" type="BaseRelationshipMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="BaseRelationshipMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for BaseRelationship instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ClassHasFields -->
  <xsd:element name="classHasFields" abstract="true" type="ClassHasFields" substitutionGroup="core:modelElement" />
  <xsd:complexType name="ClassHasFields" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end Field -->
          <xsd:element ref="field" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ClassHasFields Moniker -->
  <xsd:element name="classHasFieldsMoniker" abstract="true" type="ClassHasFieldsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="ClassHasFieldsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ClassHasFields instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelRootHasComments -->
  <xsd:element name="modelRootHasComments" abstract="true" type="ModelRootHasComments" substitutionGroup="core:modelElement" />
  <xsd:complexType name="ModelRootHasComments" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end Comment -->
          <xsd:element ref="comment" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelRootHasComments Moniker -->
  <xsd:element name="modelRootHasCommentsMoniker" abstract="true" type="ModelRootHasCommentsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="ModelRootHasCommentsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ModelRootHasComments instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Generalization -->
  <xsd:element name="generalization" type="Generalization" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Generalization">
    <xsd:annotation>
      <xsd:documentation>Inheritance between Classes.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end ModelClass -->
          <xsd:element ref="modelClassMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Property: Discriminator -->
        <xsd:attribute name="discriminator" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Generalization Moniker -->
  <xsd:element name="generalizationMoniker" abstract="true" type="GeneralizationMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="GeneralizationMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Generalization instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- OneToOne -->
  <xsd:element name="oneToOne" type="OneToOne" substitutionGroup="baseRelationship" />
  <xsd:complexType name="OneToOne">
    <xsd:complexContent>
      <xsd:extension base="BaseRelationship">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: RelationColumn -->
        <xsd:attribute name="relationColumn" type="xsd:string" />
        <!-- Property: Cascade -->
        <xsd:attribute name="cascade" type="xsd:string" />
        <!-- Property: IsImported -->
        <xsd:attribute name="isImported" type="xsd:boolean" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- OneToOne Moniker -->
  <xsd:element name="oneToOneMoniker" type="OneToOneMoniker" substitutionGroup="baseRelationshipMoniker" />
  <xsd:complexType name="OneToOneMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for OneToOne instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="BaseRelationshipMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- OneToMany -->
  <xsd:element name="oneToMany" type="OneToMany" substitutionGroup="baseRelationship" />
  <xsd:complexType name="OneToMany">
    <xsd:complexContent>
      <xsd:extension base="BaseRelationship">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: RelationColumn -->
        <xsd:attribute name="relationColumn" type="xsd:string" />
        <!-- Property: Cascade -->
        <xsd:attribute name="cascade" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- OneToMany Moniker -->
  <xsd:element name="oneToManyMoniker" type="OneToManyMoniker" substitutionGroup="baseRelationshipMoniker" />
  <xsd:complexType name="OneToManyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for OneToMany instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="BaseRelationshipMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelRootHasTypes -->
  <xsd:element name="modelRootHasTypes" abstract="true" type="ModelRootHasTypes" substitutionGroup="core:modelElement" />
  <xsd:complexType name="ModelRootHasTypes" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end ModelType -->
          <xsd:element ref="modelType" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ModelRootHasTypes Moniker -->
  <xsd:element name="modelRootHasTypesMoniker" abstract="true" type="ModelRootHasTypesMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="ModelRootHasTypesMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ModelRootHasTypes instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- CommentReferencesSubjects -->
  <xsd:element name="commentReferencesSubjects" abstract="true" type="CommentReferencesSubjects" substitutionGroup="core:modelElement" />
  <xsd:complexType name="CommentReferencesSubjects" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end ModelType -->
          <xsd:element ref="modelTypeMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- CommentReferencesSubjects Moniker -->
  <xsd:element name="commentReferencesSubjectsMoniker" abstract="true" type="CommentReferencesSubjectsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="CommentReferencesSubjectsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for CommentReferencesSubjects instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ManyToMany -->
  <xsd:element name="manyToMany" type="ManyToMany" substitutionGroup="baseRelationship" />
  <xsd:complexType name="ManyToMany">
    <xsd:complexContent>
      <xsd:extension base="BaseRelationship">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: JoinTable -->
        <xsd:attribute name="joinTable" type="xsd:string" />
        <!-- Property: JoinColumn -->
        <xsd:attribute name="joinColumn" type="xsd:string" />
        <!-- Property: OwnerColumn -->
        <xsd:attribute name="ownerColumn" type="xsd:string" />
        <!-- Property: Cascade -->
        <xsd:attribute name="cascade" type="xsd:string" />
        <!-- Property: OwnerKey -->
        <xsd:attribute name="ownerKey" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ManyToMany Moniker -->
  <xsd:element name="manyToManyMoniker" type="ManyToManyMoniker" substitutionGroup="baseRelationshipMoniker" />
  <xsd:complexType name="ManyToManyMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ManyToMany instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="BaseRelationshipMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ClassHasPersistentKeys -->
  <xsd:element name="classHasPersistentKeys" abstract="true" type="ClassHasPersistentKeys" substitutionGroup="core:modelElement" />
  <xsd:complexType name="ClassHasPersistentKeys" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end PersistentKey -->
          <xsd:element ref="persistentKey" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ClassHasPersistentKeys Moniker -->
  <xsd:element name="classHasPersistentKeysMoniker" abstract="true" type="ClassHasPersistentKeysMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="ClassHasPersistentKeysMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ClassHasPersistentKeys instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Enum AccessModifier -->
  <xsd:simpleType name="AccessModifier">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Public"/>
      <xsd:enumeration value="Assembly"/>
      <xsd:enumeration value="Private"/>
      <xsd:enumeration value="Family"/>
      <xsd:enumeration value="FamilyOrAssembly"/>
      <xsd:enumeration value="FamilyAndAssembly"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <!-- Enum TypeAccessModifier -->
  <xsd:simpleType name="TypeAccessModifier">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Public"/>
      <xsd:enumeration value="Private"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <!-- Enum InheritanceModifier -->
  <xsd:simpleType name="InheritanceModifier">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="None"/>
      <xsd:enumeration value="Abstract"/>
      <xsd:enumeration value="Sealed"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <!-- Enum Multiplicity -->
  <xsd:simpleType name="Multiplicity">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="ZeroMany">
        <xsd:annotation>
          <xsd:documentation>0..*</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="One"/>
      <xsd:enumeration value="ZeroOne"/>
      <xsd:enumeration value="OneMany"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <!-- Enum OperationConcurrency -->
  <xsd:simpleType name="OperationConcurrency">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Sequential"/>
      <xsd:enumeration value="Guarded"/>
      <xsd:enumeration value="Concurrent"/>
    </xsd:restriction>
  </xsd:simpleType>
  
</xsd:schema>

